phidget21.phidcommon

This file is part of libphidget21

Copyright 2006-2015 Phidgets Inc <patrick@phidgets.com>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, see <http://www.gnu.org/licenses/>

Members

Aliases

CPhidgetHandle
alias CPhidgetHandle = _CPhidget*
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CPhidget_Timestamp
alias CPhidget_Timestamp = _CPhidget_Timestamp
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CPhidget_TimestampHandle
alias CPhidget_TimestampHandle = _CPhidget_Timestamp*
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CPhidget_set_OnAttach_Handler_Func
alias CPhidget_set_OnAttach_Handler_Func = int function(CPhidgetHandle phid, void* userPtr)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CPhidget_set_OnDetach_Handler_Func
alias CPhidget_set_OnDetach_Handler_Func = int function(CPhidgetHandle phid, void* userPtr)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CPhidget_set_OnError_Handler_Func
alias CPhidget_set_OnError_Handler_Func = int function(CPhidgetHandle phid, void* userPtr, int errorCode, const char* errorString)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CPhidget_set_OnServerConnect_Handler_Func
alias CPhidget_set_OnServerConnect_Handler_Func = int function(CPhidgetHandle phid, void* userPtr)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
CPhidget_set_OnServerDisconnect_Handler_Func
alias CPhidget_set_OnServerDisconnect_Handler_Func = int function(CPhidgetHandle phid, void* userPtr)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Enums

CPhidget_DeviceUID
enum CPhidget_DeviceUID
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Static variables

CPhidget_close
int function(CPhidgetHandle phid) CPhidget_close;

Closes a Phidget.

CPhidget_delete
int function(CPhidgetHandle phid) CPhidget_delete;

Frees a Phidget handle.

CPhidget_getDeviceClass
int function(CPhidgetHandle phid, CPhidget_DeviceClass* deviceClass) CPhidget_getDeviceClass;

Gets the class of a Phidget Handle.

CPhidget_getDeviceID
int function(CPhidgetHandle phid, CPhidget_DeviceID* deviceID) CPhidget_getDeviceID;

Gets the device ID of a Phidget.

CPhidget_getDeviceLabel
int function(CPhidgetHandle phid, const char** deviceLabel) CPhidget_getDeviceLabel;

Gets the label of a Phidget.

CPhidget_getDeviceName
int function(CPhidgetHandle phid, const char** deviceName) CPhidget_getDeviceName;

Gets the specific name of a Phidget.

CPhidget_getDeviceStatus
int function(CPhidgetHandle phid, int* deviceStatus) CPhidget_getDeviceStatus;

Gets the attached status of a Phidget.

CPhidget_getDeviceType
int function(CPhidgetHandle phid, const char** deviceType) CPhidget_getDeviceType;

Gets the type (class) of a Phidget.

CPhidget_getDeviceVersion
int function(CPhidgetHandle phid, int* deviceVersion) CPhidget_getDeviceVersion;

Gets the firmware version of a Phidget.

CPhidget_getErrorDescription
int function(int errorCode, const char** errorString) CPhidget_getErrorDescription;

Gets the description for an error code.

CPhidget_getLibraryVersion
int function(const char** libraryVersion) CPhidget_getLibraryVersion;

Gets the library version. This contains a version number and a build date.

CPhidget_getSerialNumber
int function(CPhidgetHandle phid, int* serialNumber) CPhidget_getSerialNumber;

Gets the serial number of a Phidget.

CPhidget_getServerAddress
int function(CPhidgetHandle phid, const char** address, int* port) CPhidget_getServerAddress;

Gets the address and port of a remotely opened Phidget. This will fail f the Phidget was opened locally.

CPhidget_getServerID
int function(CPhidgetHandle phid, const char** serverID) CPhidget_getServerID;

Gets the server ID fo a remotely opened Phidget. This will fail if the Phidget was opened locally.

CPhidget_getServerStatus
int function(CPhidgetHandle phid, int* serverStatus) CPhidget_getServerStatus;

Gets the connected to server status of a remotely opened Phidget. This will fail if the Phidget was opened locally.

CPhidget_open
int function(CPhidgetHandle phid, int serialNumber) CPhidget_open;

* Opens a Phidget. * * Params: * phid = A phidget handle. * serialNumber = Serial number. Specify -1 to open any.

CPhidget_openLabel
int function(CPhidgetHandle phid, const char* label) CPhidget_openLabel;

Opens a Phidget by label.

CPhidget_openLabelRemote
int function(CPhidgetHandle phid, const char* label, const char* serverID, const char* password) CPhidget_openLabelRemote;

Opens a Phidget remotely by ServerID. Note that this requires Bonjour (mDNS) to be running on both the host and the server.

CPhidget_openLabelRemoteIP
int function(CPhidgetHandle phid, const char* label, const char* address, int port, const char* password) CPhidget_openLabelRemoteIP;

Opens a Phidget remotely by address and port, with optional label.

CPhidget_openRemote
int function(CPhidgetHandle phid, int serial, const char* serverID, const char* password) CPhidget_openRemote;

Opens a Phidget remotely by ServerID. Note that this requries Bonjour (mDNS) to be running on both the host and the server.

CPhidget_openRemoteIP
int function(CPhidgetHandle phid, int serial, const char* address, int port, const char* password) CPhidget_openRemoteIP;

Opens a Phidget remotely by address and port, with optional serial number.

CPhidget_setDeviceLabel
int function(CPhidgetHandle phid, const char* deviceLabel) CPhidget_setDeviceLabel;

Gets the label of a Phidget.

CPhidget_set_OnAttach_Handler
int function(CPhidgetHandle phid, CPhidget_set_OnAttach_Handler_Func fptr, void* userPtr) CPhidget_set_OnAttach_Handler;

Sets an attach handler callback function. This is called when this Phidget is plugged into the system, and is ready for use.

CPhidget_set_OnDetach_Handler
int function(CPhidgetHandle phid, CPhidget_set_OnDetach_Handler_Func fptr, void* userPtr) CPhidget_set_OnDetach_Handler;

* Sets a detach handler callback function. This is called when this Phidget is unplugged from teh system.

CPhidget_set_OnError_Handler
int function(CPhidgetHandle phid, CPhidget_set_OnError_Handler_Func fptr, void* userPtr) CPhidget_set_OnError_Handler;

Sets the error handler callback function. This is called when an asynchronous error occurs.

CPhidget_set_OnServerConnect_Handler
int function(CPhidgetHandle phid, CPhidget_set_OnServerConnect_Handler_Func fptr, void* userPtr) CPhidget_set_OnServerConnect_Handler;

* Sets a server connect handler callback function. This is used for opening Phidgets remotely, and is called when a connection to the server has been made.

CPhidget_set_OnServerDisconnect_Handler
int function(CPhidgetHandle phid, CPhidget_set_OnServerDisconnect_Handler_Func fptr, void* userPtr) CPhidget_set_OnServerDisconnect_Handler;

Sets a server disconnect handler callback function. This is used for opening Phidgets remotely, and is called when a connection to the server has been lost.

CPhidget_waitForAttachment
int function(CPhidgetHandle phid, int milliseconds) CPhidget_waitForAttachment;

Waits for attachment to happen. This can be called right after calling CPhidget_open, as an alternative to using the attach handler.

Structs

_CPhidget
struct _CPhidget
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
_CPhidget_Timestamp
struct _CPhidget_Timestamp
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Meta